home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_HDF.idb / usr / freeware / include / hdf / hkit.h.z / hkit.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  7.1 KB  |  172 lines

  1.  
  2. /****************************************************************************
  3.  * NCSA HDF                                                                 *
  4.  * Software Development Group                                               *
  5.  * National Center for Supercomputing Applications                          *
  6.  * University of Illinois at Urbana-Champaign                               *
  7.  * 605 E. Springfield, Champaign IL 61820                                   *
  8.  *                                                                          *
  9.  * For conditions of distribution and use, see the accompanying             *
  10.  * hdf/COPYING file.                                                        *
  11.  *                                                                          *
  12.  ****************************************************************************/
  13.  
  14. /* $Id: hkit.h,v 1.15 1996/10/10 18:43:27 koziol Exp $ */
  15.  
  16. /*+ hkit.h
  17.    ***  private header file for hkit routines
  18.    + */
  19.  
  20. #ifndef __HKIT_H
  21. #include "hdf.h"
  22. #include "hfile.h"
  23.  
  24. /* tag_messages is the list of tag descriptions in the system, kept as
  25.    tag-description pairs.  To look up a description, a linear search is
  26.    required but efficiency should be okay. */
  27. typedef struct tag_descript_t
  28.   {
  29.       uint16      tag;          /* tag for description ? */
  30.       const char *desc;         /* tag description ? */
  31.       const char *name;         /* tag name ? */
  32.   }
  33. tag_descript_t;
  34.  
  35. /* stringizing macro */
  36. #if defined MIPSEL | defined KNRSUN | defined __SUNPRO_C
  37. #define string(x) #x
  38. #else
  39. #define string(x) "x"
  40. #endif /* MIPSEL */
  41.  
  42. /*  NOTE:
  43.  *        Please keep tag descriptions <= 30 characters - a
  44.  *        lot of pretty-printing code depends on it.
  45.  */
  46. PRIVATE const tag_descript_t tag_descriptions[] =
  47. {
  48. /* low-level set */
  49.     {DFTAG_NULL, string(DFTAG_NULL), "No Data"},
  50.     {DFTAG_LINKED, string(DFTAG_LINKED), "Linked Blocks Indicator"},
  51.     {DFTAG_VERSION, string(DFTAG_VERSION), "Version Descriptor"},
  52.     {DFTAG_COMPRESSED, string(DFTAG_COMPRESSED), "Compressed Data Indicator"},
  53.     {DFTAG_CHUNK, string(DFTAG_CHUNK), "Data Chunk"},
  54.  
  55. /* utility set */
  56.     {DFTAG_FID, string(DFTAG_FID), "File Identifier"},
  57.     {DFTAG_FD, string(DFTAG_FD), "File Description"},
  58.     {DFTAG_TID, string(DFTAG_TID), "Tag Identifier"},
  59.     {DFTAG_TD, string(DFTAG_TD), "Tag Description"},
  60.     {DFTAG_DIL, string(DFTAG_DIL), "Data Id Label"},
  61.     {DFTAG_DIA, string(DFTAG_DIA), "Data Id Annotation"},
  62.     {DFTAG_NT, string(DFTAG_NT), "Number type"},
  63.     {DFTAG_MT, string(DFTAG_MT), "Machine type"},
  64.     {DFTAG_FREE, string(DFTAG_FREE), "Free space"},
  65.  
  66.       /* raster-8 Tags */
  67.     {DFTAG_ID8, string(DFTAG_ID8), "Image Dimensions-8"},
  68.     {DFTAG_IP8, string(DFTAG_IP8), "Image Palette-8"},
  69.     {DFTAG_RI8, string(DFTAG_RI8), "Raster Image-8"},
  70.     {DFTAG_CI8, string(DFTAG_CI8), "RLE Compressed Image-8"},
  71.     {DFTAG_II8, string(DFTAG_II8), "Imcomp Image-8"},
  72.  
  73.       /* Raster Image Tags */
  74.     {DFTAG_ID, string(DFTAG_ID), "Image Dimensions"},
  75.     {DFTAG_LUT, string(DFTAG_LUT), "Image Palette"},
  76.     {DFTAG_RI, string(DFTAG_RI), "Raster Image Data"},
  77.     {DFTAG_CI, string(DFTAG_CI), "Compressed Image"},
  78.     {DFTAG_RIG, string(DFTAG_RIG), "Raster Image Group"},
  79.     {DFTAG_LD, string(DFTAG_LD), "Palette Dimension"},
  80.     {DFTAG_MD, string(DFTAG_MD), "Matte Dimension"},
  81.     {DFTAG_MA, string(DFTAG_MA), "Matte Data"},
  82.     {DFTAG_CCN, string(DFTAG_CCN), "Color Correction"},
  83.     {DFTAG_CFM, string(DFTAG_CFM), "Color Format"},
  84.     {DFTAG_AR, string(DFTAG_AR), "Aspect Ratio"},
  85.     {DFTAG_DRAW, string(DFTAG_DRAW), "Sequenced images"},
  86.     {DFTAG_RUN, string(DFTAG_RUN), "Runable program / script"},
  87.     {DFTAG_XYP, string(DFTAG_XYP), "X-Y position"},
  88.     {DFTAG_MTO, string(DFTAG_MTO), "M/c-Type override"},
  89.  
  90.       /* Tektronix */
  91.     {DFTAG_T14, string(DFTAG_T14), "TEK 4014 Data"},
  92.     {DFTAG_T105, string(DFTAG_T105), "TEK 4105 data"},
  93.  
  94.       /* Scientific / Numeric Data Sets */
  95.     {DFTAG_SDG, string(DFTAG_SDG), "Scientific Data Group"},
  96.     {DFTAG_SDD, string(DFTAG_SDD), "SciData dimension record"},
  97.     {DFTAG_SD, string(DFTAG_SD), "Scientific Data"},
  98.     {DFTAG_SDS, string(DFTAG_SDS), "SciData scales"},
  99.     {DFTAG_SDL, string(DFTAG_SDL), "SciData labels"},
  100.     {DFTAG_SDU, string(DFTAG_SDU), "SciData units"},
  101.     {DFTAG_SDF, string(DFTAG_SDF), "SciData formats"},
  102.     {DFTAG_SDM, string(DFTAG_SDM), "SciData max/min"},
  103.     {DFTAG_SDC, string(DFTAG_SDC), "SciData coordsys"},
  104.     {DFTAG_SDT, string(DFTAG_SDT), "Transpose"},
  105.     {DFTAG_SDLNK, string(DFTAG_SDLNK), "Links related to the dataset"},
  106.     {DFTAG_NDG, string(DFTAG_NDG), "Numeric Data Group"},
  107.     {DFTAG_CAL, string(DFTAG_CAL), "Calibration information"},
  108.     {DFTAG_FV, string(DFTAG_FV), "Fill value information"},
  109.  
  110.       /* V Group Tags */
  111.     {DFTAG_VG, string(DFTAG_VG), "Vgroup"},
  112.     {DFTAG_VH, string(DFTAG_VH), "Vdata"},
  113.     {DFTAG_VS, string(DFTAG_VS), "Vdata Storage"},
  114.  
  115.       /* Compression Schemes */
  116.     {DFTAG_RLE, string(DFTAG_RLE), "Run Length Encoding"},
  117.     {DFTAG_IMCOMP, string(DFTAG_IMCOMP), "IMCOMP Encoding"},
  118.     {DFTAG_JPEG, string(DFTAG_JPEG), "24-bit JPEG Encoding"},
  119.     {DFTAG_GREYJPEG, string(DFTAG_GREYJPEG), "8-bit JPEG Encoding"},
  120.     {DFTAG_JPEG5, string(DFTAG_JPEG5), "24-bit JPEG Encoding"},
  121.     {DFTAG_GREYJPEG5, string(DFTAG_GREYJPEG5), "8-bit JPEG Encoding"}
  122.  
  123. };
  124.  
  125. /* nt_message is the list of NT descriptions in the system, kept as
  126.    NT-description pairs.  To look up a description, a linear search is
  127.    required but efficiency should be okay. */
  128. typedef struct nt_descript_t
  129.   {
  130.       int32       nt;           /* nt for description */
  131.       const char *name;         /* nt name */
  132.       const char *desc;         /* nt description */
  133.   }
  134. nt_descript_t;
  135.  
  136. PRIVATE const nt_descript_t nt_descriptions[] =
  137. {
  138.  
  139. /* Masks for types */
  140.     {DFNT_NATIVE, string(DFNT_NATIVE), "native format"},
  141.     {DFNT_CUSTOM, string(DFNT_CUSTOM), "custom format"},
  142.     {DFNT_LITEND, string(DFNT_LITEND), "little-endian format"},
  143.  
  144.     {DFNT_NONE, string(DFNT_NONE), "number-type not set"},
  145.  
  146. /* Floating point types */
  147.     {DFNT_FLOAT32, string(DFNT_FLOAT32), "32-bit floating point"},
  148.     {DFNT_FLOAT64, string(DFNT_FLOAT64), "64-bit floating point"},
  149.     {DFNT_FLOAT128, string(DFNT_FLOAT128), "128-bit floating point"},
  150.  
  151. /* Integer types */
  152.     {DFNT_INT8, string(DFNT_INT8), "8-bit signed integer"},
  153.     {DFNT_UINT8, string(DFNT_UINT8), "8-bit unsigned integer"},
  154.     {DFNT_INT16, string(DFNT_INT16), "16-bit signed integer"},
  155.     {DFNT_UINT16, string(DFNT_UINT16), "16-bit unsigned integer"},
  156.     {DFNT_INT32, string(DFNT_INT32), "32-bit signed integer"},
  157.     {DFNT_UINT32, string(DFNT_UINT32), "32-bit unsigned integer"},
  158.     {DFNT_INT64, string(DFNT_INT64), "64-bit signed integer"},
  159.     {DFNT_UINT64, string(DFNT_UINT64), "64-bit unsigned integer"},
  160.     {DFNT_INT128, string(DFNT_INT128), "128-bit signed integer"},
  161.     {DFNT_UINT128, string(DFNT_UINT128), "128-bit unsigned integer"},
  162.  
  163. /* Character types */
  164.     {DFNT_CHAR8, string(DFNT_CHAR8), "8-bit signed char"},
  165.     {DFNT_UCHAR8, string(DFNT_UCHAR8), "8-bit unsigned char"},
  166.     {DFNT_CHAR16, string(DFNT_CHAR16), "16-bit signed char"},
  167.     {DFNT_UCHAR16, string(DFNT_UCHAR16), "16-bit unsigned char"}
  168.  
  169. };
  170.  
  171. #endif /* __HKIT_H */
  172.